<?php

class Feed extends Mysql {
	public function __construct() {
		parent::__construct();
	}
	/**
	 * 添加一个订阅信息 
	 * @param  $email
	 */
	public function add($email) {
		$sql = "insert into feed(email, time, validated) values('$email', 'NOW()', '0');";
		return $this->exec_update($sql);
	}
	
	/**
	 * 通过验证
	 * @param unknown_type $id
	 * @param unknown_type $email
	 */
	public function validate($id, $email) {
		$sql = "update feed set validated = '1' where id = $id and email = '$email';";
		
		$this->exec_update($sql);
	}
	
}


?>